﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WorkflowWizart.Lib.Utility.Costants;

namespace WorkflowWizart.Lib.Entities.WorkflowEntities
{
    public class Workflow 
    {
        public Workflow()
        {
            this.Parameters = new List<WorkflowParameter>();
            this.Items = new List<WorkflowItem>();
            this.ScopesVariable = new List<ScopeVariable>();
        }


        public string Id
        {
            get
            {
                return Name.Replace(" ", "_");
            }
        }
          

        public string Name { get; set; }
        /// <summary>
        /// workflows parameters / methos parameters with types and name 
        /// </summary>
        public List<WorkflowParameter> Parameters { get; set; }

        /// <summary>
        /// Workflows return type in string  (void/value/object[user,visitır etc...])
        /// </summary>
        public string ReturnType { get; set; }
        /// <summary>
        /// items in workflow / rows / lines
        /// </summary>
        public List<WorkflowItem> Items { get; set; } 

        ///// <summary>
        ///// Results of workflow items after executed
        ///// </summary>
        //public   List<WorkflowItemResult> WorkflowItemResults = new List<WorkflowItemResult>();
        
        /// <summary>
        /// Variables available in this workflow scope
        /// </summary>
        internal List<ScopeVariable> ScopesVariable = new List<ScopeVariable>();
    }
}
